#include <stdio.h>
#include <stdlib.h>

#include "compare_util.h"

int main(int argc, char *argv[])
{
    char *str1 = "hello I'm compare";
    char *str2 = "hello I'm compare util";
    char *str3 = "HELLO I'M COMPARE util";
    uint8_t hex1[] = {0x01, 0x02, 0x03, 0x04, 0x05};
    uint8_t hex2[] = {0x01, 0x02, 0x03, 0x04, 0x06};

    printf("compare_hex: %d\n", compare_hex(hex1, hex2, 4));  // = 0
    printf("compare_hex: %d\n", compare_hex(hex1, hex2, 5));  // < 0

    printf("compare_str: %d\n", compare_str(str1, str2));     // < 0
    printf("compare_str: %d\n", compare_str(str2, str3));     // > 0

    printf("compare_str_ignore_case: %d\n", compare_str_ignore_case(str1, str2));  // < 0
    printf("compare_str_ignore_case: %d\n", compare_str_ignore_case(str2, str3));  // = 0

    printf("compare_strn: %d\n", compare_nstr(str1, str2, 17)); // = 0
    printf("compare_strn: %d\n", compare_nstr(str2, str3, 22)); // > 0

    printf("compare_strn_ignore_case: %d\n", compare_nstr_ignore_case(str1, str2, 17)); // = 0
    printf("compare_strn_ignore_case: %d\n", compare_nstr_ignore_case(str2, str3, 22)); // = 0

    return 0;
}
